﻿<ResourceDictionary
   x:Uid="ResourceDictionary_1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
   xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core" 
    xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" 
    >
    <fd:HeaderFilterConverter x:Uid="fd:HeaderFilterConverter_1" x:Key="headerConverter"/>
    <Style x:Uid="Style_1" TargetType="{x:Type DataGridColumnHeader}">
        <Setter x:Uid="Setter_1" Property="VerticalContentAlignment" Value="Center"/>
        <Setter x:Uid="Setter_2" Property="Template">
            <Setter.Value>
                <ControlTemplate x:Uid="ControlTemplate_1" TargetType="{x:Type DataGridColumnHeader}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Uid="Storyboard_1" x:Key="ShowFilterControl">
                            <ObjectAnimationUsingKeyFrames x:Uid="ObjectAnimationUsingKeyFrames_1" BeginTime="00:00:00" Storyboard.TargetName="filterTextBox" 
                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame x:Uid="DiscreteObjectKeyFrame_1" KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                                <DiscreteObjectKeyFrame x:Uid="DiscreteObjectKeyFrame_2" KeyTime="00:00:00.5000000" Value="{x:Static Visibility.Visible}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames x:Uid="ColorAnimationUsingKeyFrames_1" BeginTime="00:00:00" Storyboard.TargetName="filterTextBox" 
                                                          Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                                <SplineColorKeyFrame x:Uid="SplineColorKeyFrame_1" KeyTime="00:00:00" Value="Transparent"/>
                                <SplineColorKeyFrame x:Uid="SplineColorKeyFrame_2" KeyTime="00:00:00.5000000" Value="White"/>
                            </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Uid="Storyboard_2" x:Key="HideFilterControl">
                            <ObjectAnimationUsingKeyFrames x:Uid="ObjectAnimationUsingKeyFrames_2" BeginTime="00:00:00" Storyboard.TargetName="filterTextBox"
                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame x:Uid="DiscreteObjectKeyFrame_3" KeyTime="00:00:00.4000000" Value="{x:Static Visibility.Collapsed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames x:Uid="ColorAnimationUsingKeyFrames_2" BeginTime="00:00:00" Storyboard.TargetName="filterTextBox" 
                                                          Storyboard.TargetProperty="(UIElement.OpacityMask).(SolidColorBrush.Color)">
                                <SplineColorKeyFrame x:Uid="SplineColorKeyFrame_3" KeyTime="00:00:00" Value="Black"/>
                                <SplineColorKeyFrame x:Uid="SplineColorKeyFrame_4" KeyTime="00:00:00.4000000" Value="#00000000"/>
                            </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <ControlTemplate.Triggers>
                        <Trigger x:Uid="Trigger_1" Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Uid="ShowFilterControl_BeginStoryboard" x:Name="ShowFilterControl_BeginStoryboard" Storyboard="{StaticResource ShowFilterControl}"/>
                                <StopStoryboard x:Uid="StopStoryboard_1" BeginStoryboardName="HideFilterControl_BeginShowFilterControl"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Uid="HideFilterControl_BeginShowFilterControl" x:Name="HideFilterControl_BeginShowFilterControl" Storyboard="{StaticResource HideFilterControl}"/>
                                <StopStoryboard x:Uid="StopStoryboard_2" BeginStoryboardName="ShowFilterControl_BeginStoryboard"/>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
